/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.lestr.udm.core.api;

import org.lestr.udm.core.impl.RAMDataManager;
import org.lestr.udm.core.util.TransactionnalDataManager;

/**
 *
 * @author pibonnin
 */
public class RootDataManager implements IDataManager {


    private static final Object lock = new Object();
    

    private static RootDataManager singleton;


    public static synchronized RootDataManager getSingleton() {
        
        return singleton == null ? singleton = new RootDataManager() : singleton;
        
    }// END Method getSingleton


    private IDataManager dataManager;


    private RootDataManager() {

        dataManager = new TransactionnalDataManager(new RAMDataManager());

    }// END Constructor


    @Override
    public ISession openSession() {

        return dataManager.openSession();

    }// END Method RootDataManager


}// FIN Classe RootDataManager
